<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<%@ include file="/common/taglibs.jsp"%>
<link href="${ctx}/resources/admin/css/common.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="${ctx}/resources/admin/js/jquery.js"></script>
<script type="text/javascript" src="${ctx}/resources/admin/js/common.js"></script>
<script type="text/javascript" src="${ctx}/resources/admin/js/list.js"></script>
<script type="text/javascript">
$().ready(function() {

	var $listForm = $("#listForm");
	var $filterSelect = $("#filterSelect");
	var $filterOption = $("#filterOption a");
	var $print = $("select[name='print']");

	// 订单筛选
	$filterSelect.mouseover(function() {
		var $this = $(this);
		var offset = $this.offset();
		var $menuWrap = $this.closest("div.menuWrap");
		var $popupMenu = $menuWrap.children("div.popupMenu");
		$popupMenu.css({left: offset.left, top: offset.top + $this.height() + 2}).show();
		$menuWrap.mouseleave(function() {
			$popupMenu.hide();
		});
	});
	
	// 筛选选项
	$filterOption.click(function() {
		var $this = $(this);
		var $dest = $("#" + $this.attr("name"));
		if ($this.hasClass("checked")) {
			$dest.val("");
		} else {
			$dest.val($this.attr("val"));
		}
		$listForm.submit();
		return false;
	});
	
	// 打印选择
	$print.change(function() {
		var $this = $(this);
		if ($this.val() != "") {
			window.open($this.val());
		}
	});

});
</script>
</head>
<body>
	<div class="path">
		<a href="${ctx}/admin_Admin_index.action">首页</a> &raquo; 订单列表 <span>(共<span id="pageTotal">573</span>条记录)</span>
	</div>
	<form id="listForm" action="list.jhtml" method="get">
		<input type="hidden" value="" name="orderStatus" id="orderStatus" />
		<input type="hidden" value="" name="paymentStatus" id="paymentStatus" />
		<input type="hidden" value="" name="shippingStatus" id="shippingStatus" />
		<input type="hidden" value="" name="hasExpired" id="hasExpired" />
		<div class="bar">
			<div class="buttonWrap">
				<a class="iconButton disabled" id="deleteButton" href="javascript:;">
					<span class="deleteIcon">&nbsp;</span>删除
				</a>
				<a class="iconButton" id="refreshButton" href="javascript:;">
					<span class="refreshIcon">&nbsp;</span>刷新
				</a>
				<div class="menuWrap">
					<a class="button" id="filterSelect" href="javascript:;">
						订单筛选<span class="arrow">&nbsp;</span>
					</a>
					<div class="popupMenu" style="left: 139px; top: 59px; display: none;">
						<ul class="check" id="filterOption">
							<li>
								<a val="unconfirmed" name="orderStatus" href="javascript:;">未确认</a>
							</li>
							<li>
								<a val="confirmed" name="orderStatus" href="javascript:;">已确认</a>
							</li>
							<li>
								<a val="completed" name="orderStatus" href="javascript:;">已完成</a>
							</li>
							<li>
								<a val="cancelled" name="orderStatus" href="javascript:;">已取消</a>
							</li>
							<li class="separator">
								<a val="unpaid" name="paymentStatus" href="javascript:;">未支付</a>
							</li>
							<li>
								<a val="partialPayment" name="paymentStatus" href="javascript:;">部分支付</a>
							</li>
							<li>
								<a val="paid" name="paymentStatus" href="javascript:;">已支付</a>
							</li>
							<li>
								<a val="partialRefunds" name="paymentStatus" href="javascript:;">部分退款</a>
							</li>
							<li>
								<a val="refunded" name="paymentStatus" href="javascript:;">已退款</a>
							</li>
							<li class="separator">
								<a val="unshipped" name="shippingStatus" href="javascript:;">未发货</a>
							</li>
							<li>
								<a val="partialShipment" name="shippingStatus" href="javascript:;">部分发货</a>
							</li>
							<li>
								<a val="shipped" name="shippingStatus" href="javascript:;">已发货</a>
							</li>
							<li>
								<a val="partialReturns" name="shippingStatus" href="javascript:;">部分退货</a>
							</li>
							<li>
								<a val="returned" name="shippingStatus" href="javascript:;">已退货</a>
							</li>
							<li class="separator">
								<a val="true" name="hasExpired" href="javascript:;">已过期</a>
							</li>
							<li>
								<a val="false" name="hasExpired" href="javascript:;">未过期</a>
							</li>
						</ul>
					</div>
				</div>
				<div class="menuWrap">
					<a class="button" id="pageSizeSelect" href="javascript:;">
						每页显示<span class="arrow">&nbsp;</span>
					</a>
					<div class="popupMenu" style="left: 220px; top: 59px; display: none;">
						<ul id="pageSizeOption">
							<li>
								<a val="10" href="javascript:;">10</a>
							</li>
							<li>
								<a val="20" class="current" href="javascript:;">20</a>
							</li>
							<li>
								<a val="50" href="javascript:;">50</a>
							</li>
							<li>
								<a val="100" href="javascript:;">100</a>
							</li>
						</ul>
					</div>
				</div>
			</div>
			<div class="menuWrap">
				<div class="search">
					<span class="arrow" id="searchPropertySelect">&nbsp;</span>
					<input type="text" maxlength="200" value="" name="searchValue" id="searchValue" />
					<button type="submit">&nbsp;</button>
				</div>
				<div class="popupMenu" style="left: 917px; top: 58px; display: none;">
					<ul id="searchPropertyOption">
						<li>
							<a val="sn" class="current" href="javascript:;">订单编号</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<table id="listTable" class="list">
			<tr>
				<th class="check">
					<input type="checkbox" id="selectAll" />
				</th>
				<th>
					<a href="javascript:;" class="sort" name="sn">订单编号</a>
				</th>
				<th>
					<span>订单金额</span>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="member">会员</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="consignee">收货人</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="paymentMethodName">支付方式名称</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="shippingMethodName">配送方式名称</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="orderStatus">订单状态</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="paymentStatus">支付状态</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="shippingStatus">配送状态</a>
				</th>
				<th>
					<a href="javascript:;" class="sort" name="createDate">创建日期</a>
				</th>
				<th>
					<span>打印</span>
				</th>
				<th>
					<span>操作</span>
				</th>
			</tr>
			
			  <tr>
					<td>
						<input type="checkbox" value="573" name="ids" />
					</td>
					<td>
						201309271247
					</td>
					<td>
						￥294.29
					</td>
					<td>
						wang_123456
					</td>
					<td>
						王锦梅
					</td>
					<td>
						货到付款
					</td>
					<td>
						顺丰速递
					</td>
					<td>
						未确认
						
					</td>
					<td>
						未支付
					</td>
					<td>
						未发货
					</td>
					<td>
						<span title="2013-09-27 15:00:51">2013-09-27</span>
					</td>
						<td>
							<select name="print">
								<option value="">请选择...</option>
								<option value="../print/order.jhtml?id=573">订单</option>
								<option value="../print/product.jhtml?id=573">购物单</option>
								<option value="../print/shipping.jhtml?id=573">配送单</option>
								<option value="../print/delivery.jhtml?orderId=573">快递单</option>
							</select>
						</td>
					<td>
						<a href="view.jhtml?id=573">[查看]</a>
							<a href="edit.jhtml?id=573">[编辑]</a>
					</td>
				</tr>
		</table>
		
		
		<div class="pagination">
			<span class="firstPage">&nbsp;</span>
			<span class="previousPage">&nbsp;</span>
				<span class="currentPage">1</span>
				<a href="javascript: $.pageSkip(2);">2</a>
				<a href="javascript: $.pageSkip(3);">3</a>
				<span class="pageBreak">...</span>
			<a href="javascript: $.pageSkip(2);" class="nextPage">&nbsp;</a>
			<a href="javascript: $.pageSkip(29);" class="lastPage">&nbsp;</a>
			<span class="pageSkip">
				共29页 到第<input onpaste="return false;" maxlength="9" value="1" name="pageNumber" id="pageNumber" />页<button type="submit">&nbsp;</button>
			</span>
		</div>
	
	</form>
</body>
</html>